package com.gomore.opple.module.gooddetail;


import com.gomore.opple.BasePresenter;
import com.gomore.opple.BaseView;
import com.gomore.opple.rest.shopcart.SaveShoppingCartRequest;
import com.gomore.opple.web.cgform.consumer.entity.TOConsumerEntity;
import com.gomore.opple.web.cgform.goods.entity.TOGoodsEntity;

public interface GoodDetailContract {

    interface View extends BaseView<Presenter> {

        /**
         * 显示进度条
         */
        void showProgressDialog();

        /**
         * 隐藏进度条
         */
        void hideProgressDialog();

        /**
         * 展示消息
         *
         * @param msg 消息
         */
        void showMessage(String msg);

        /**
         * 展示消息
         *
         * @param msgId 消息id
         */
        void showMessage(int msgId);

        /**
         * 展示内容
         */
        void showContentView(TOGoodsEntity toGoodsEntity);

        void finish();

    }

    interface Presenter extends BasePresenter {

        /**
         * 准备初始化数据
         */
        void prepareInitData();

        /**
         * 通过商品id获取商品
         *
         * @param goodId
         */
        void getGoodById(String goodId);

        /**
         * 添加商品到购物车
         */
        void addToShoppingCar(SaveShoppingCartRequest saveShoppingCartRequest);

        /**
         * 获取客户
         *
         * @return
         */
        TOConsumerEntity getConsumer();

        /**
         * 获取商品
         *
         * @return
         */
        TOGoodsEntity getTOGoodsEntity();
    }
}
